Skip to content

docs(xml-libxml): plan for Java-backed XML::LibXML port#581

Merged
fglock merged 1 commit intomasterfrom
feature/xml-libxml-plan
Apr 28, 2026
Merged

docs(xml-libxml): plan for Java-backed XML::LibXML port#581
fglock merged 1 commit intomasterfrom
feature/xml-libxml-plan

Conversation

@fglock
Copy link
Copy Markdown
Owner

@fglock fglock commented Apr 28, 2026

Summary

Adds a planning document at dev/modules/xml_libxml.md scoping a
Java-backed re-implementation of XML::LibXML for PerlOnJava.

Plan only — no code changes.

Motivation

jcpan -t XML::Diff currently fails because XML::Diff requires
XML::LibXML 1.56, and XML::LibXML cannot be installed under jperl:

  • Its Makefile.PL requires Alien::Libxml2, which expects either a
    system libxml2 via pkg-config or an Alien::Build-installed share
    dir — neither is available.
  • Even if Alien were satisfied, LibXML.xs cannot be loaded by the JVM.

Result: Can't locate Alien/Libxml2/ConfigData.pm, dependent test
suites abort on use XML::LibXML;.

Approach

Mirror the XML::Parser port (XMLParserExpat.java, ~2,200 LOC of
JDK SAX glue) with XMLLibXML.java backed by javax.xml.parsers +
org.w3c.dom + javax.xml.xpath. No new Maven/Gradle dependencies
for Tier A.

Tiers (sized in the doc)

Tier Scope LOC estimate Effort
A XML::Diff unblock (~30 methods) 1,000–1,700 2–4 days
B "Useful" coverage (~80% of CPAN consumers) 3,000–5,000 1.5–3 weeks
C Comprehensive (validation, XInclude, SAX, …) 7,000–11,000 1.5–3 months

Upstream XML::LibXML 2.0210 is ~10k .pm + ~5k .xs for reference.

Out of scope for this PR

Implementation. A follow-up branch will scaffold Tier A.

Test plan

  • Doc-only change; no build/test impact.
  • (Follow-up Tier A PR) jcpan -t XML::Diff passes 38/38; make and make test-bundled-modules stay green.

Generated with Devin

Scopes a tiered re-implementation of XML::LibXML on top of the JDK's
javax.xml / org.w3c.dom stack, modelled on the existing XML::Parser
port. Motivated by `jcpan -t XML::Diff` failing on the unsatisfiable
Alien::Libxml2 / XS dependency chain.

Plan only -- no code changes.

Generated with [Devin](https://cli.devin.ai/docs)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@fglock fglock merged commit 64a6a17 into master Apr 28, 2026
2 checks passed
@fglock fglock deleted the feature/xml-libxml-plan branch April 28, 2026 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant